version: '3.9'
  
services:
  fnsa-mlserver:
    container_name: fnsa-mlserver
    image: seldonio/mlserver:1.5.0-huggingface
    environment:
      - MLSERVER_MODELS_DIR=/models
      - MLSERVER_HTTP_PORT=8080
      - MLSERVER_GRPC_PORT=8008
      - MLSERVER_LOAD_MODELS_AT_STARTUP=true
      - MLSERVER_HOST=0.0.0.0
      - MLSERVER_GRPC_MAX_MESSAGE_LENGTH=-1
    ports:
      - 8080:8080
      - 8008:8008
    volumes:
      - ./fnsa-mlserver:/models
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: 1
    #           capabilities: [gpu]